<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../static/css/sb-admin-2.css">
<link href="../static/prettify/github-v2.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="../static/js/html5shiv.min.js"></script>
      <script src="../static/js/respond.min.js"></script>
    <![endif]-->
<style>
body {
	word-wrap: break-word;
}
</style>
</head>
<body onload="prettyPrint();">
	<div id="nav"></div>

	<div id="page-wrapper" style="padding: 10px">
		<div class="container-fluid">
			<div class="row">
				<div class="col-md-12">
					在页面中，除了可以运用thymeleaf提供的一些辅助方法之外，还有一些额外的辅助对象可供调用，在渲染任何模板之前，
					<code>me.qyh.blog.ui.UIExposeHelper</code>
					会将这些辅助对象设置为request的属性，因此，可以在页面通过&#36;{对象request名称}获取辅助对象。
					<div class="alert alert-warning">
						这些在request中的辅助对象无法被覆盖，任何尝试覆盖的操作都会抛出一个
						<code>TemplateProcessException</code>
						异常。
					</div>
					<p>下面是一些辅助对象的介绍</p>
					<h2 id="urls">urls</h2>
					<p>该对象用来获取其他对象的一些访问链接，它提供了以下的一些方法</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>getDomain()</td>
									<td>返回配置的域名</td>
									<td>String</td>
									<td>&#36;{urls.domain }</td>
								</tr>
								<tr>
									<td>getCurrentUrl()</td>
									<td>获取当前的链接，如果你正在访问一个名为java的space，
										那么这个链接返回的是http://domain.com/space/java(没有允许多域名)
										或者http://space.domain.com(允许了多域名)，如果你没有访问任何space，
										那么返回的是http://domain.com</td>
									<td>String</td>
									<td>&#36;{urls.currentUrl }</td>
								</tr>
								<tr>
									<td>getSpace()</td>
									<td>返回访问路径中的spaceAlias</td>
									<td>String</td>
									<td>&#36;{urls.space }</td>
								</tr>
								<tr>
									<td>getUrl()</td>
									<td>返回http://domain.com</td>
									<td>String</td>
									<td>&#36;{urls.url }</td>
								</tr>
								<tr>
									<td>getUrl(Space space)</td>
									<td>获取空间主页的访问链接</td>
									<td>String</td>
									<td>&#36;{urls.getUrl(space) }</td>
								</tr>
								<tr>
									<td>getUrl(Article article)</td>
									<td>获取某篇文章的访问链接</td>
									<td>String</td>
									<td>&#36;{urls.getUrl(article) }</td>
								</tr>
								<tr>
									<td>getUrl(PathTemplate template)</td>
									<td>获取页面的访问链接</td>
									<td>String</td>
									<td>&#36;{urls.getUrl(template) }</td>
								</tr>
								<tr>
									<td>getUrl(News news)</td>
									<td>获取访问动态详情的链接</td>
									<td>String</td>
									<td>&#36;{urls.getUrl(news) }</td>
								</tr>
								<tr>
									<td>getFullUrl()</td>
									<td>获取当前页面的完整地址</td>
									<td>String</td>
									<td>&#36;{urls.fullUrl }</td>
								</tr>
								<tr>
									<td>getArticlesUrlHelper()</td>
									<td colspan="3">同<code>getArticlesUrlHelper("")</code></td>
								</tr>

								<tr>
									<td>getArticlesUrlHelper(String path)</td>
									<td>获取用于获取文章分页查询连接的辅助对象</td>
									<td>ArticlesUrlHelper(<a data-toggle="modal"
										data-target="#articlesUrlHelperModal" href="###">查看ArticlesUrlHelper可供调用的方法</a>)
									</td>
									<td>&#36;{urls.getArticlesUrlHelper(path) }</td>
								</tr>
								
								<tr>
									<td>getNewsUrlHelper()</td>
									<td colspan="3">同<code>getNewsUrlHelper("news")</code></td>
								</tr>

								<tr>
									<td>getNewsUrlHelper(String path)</td>
									<td>获取用于获取动态分页查询连接的辅助对象</td>
									<td>NewsUrlHelper(<a data-toggle="modal"
										data-target="#newsUrlHelperModal" href="###">查看NewsUrlHelper可供调用的方法</a>)
									</td>
									<td>&#36;{urls.getNewsUrlHelper(path) }</td>
								</tr>

								<tr>
									<td>getUnlockUrl(Lock lock, String redirectUrl)</td>
									<td>用于获取指定的解锁地址，通常用于locked标签中</td>
									<td>String</td>
									<td>&#36;{urls.getUnlockUrl(lock,urls.fullUrl) }</td>
								</tr>
								
								<tr>
									<td>getCookieHelper()</td>
									<td>用于获取cookie的辅助操作对象</td>
									<td>CookieHelper(<a data-toggle="modal"
										data-target="#cookieHelperModal" href="###">查看CookieHelper可供调用的方法</a>)</td>
									<td>&#36;{urls.cookieHelper }</td>
								</tr>

							</tbody>
						</table>
					</div>
					<h2 id="users">users</h2>
					<p>
						获取用户信息，<b>只有在登录状态才能获取到，未登录返回null，因此该参数可以用来判断用户是否登录，如果希望在未登录状态也能获取到管理员信息，
							可以通过<a href="data/user.html">用户信息标签</a>来获取
						</b>
					</p>
					<p>
						User对象的可访问参数请见<a href="data/user.html">用户信息标签</a>
					</p>

					<h2 id="ip">ip</h2>
					<p>获取当前访问用户的IP</p>


					<h2 id="lock">lock(只有在解锁页面才能获取)</h2>
					<p>获取上下文中的锁对象，如果不存在锁，返回null</p>
					<p>锁对象的基本属性如下(其他的属性需要根据不同的锁来获取)：</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th>类型</th>
									<th>是否为null</th>
									<th>说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>id</td>
									<td>String</td>
									<td>false</td>
									<td>锁ID</td>
								</tr>
								<tr>
									<td>name</td>
									<td>String</td>
									<td>false</td>
									<td>锁名称</td>
								</tr>
							</tbody>
						</table>
					</div>

					<h2 id="messages">messages</h2>
					<p>系统绝大部分文本信息都通过Message对象来传递，messages则用来将这些对象转换为具体的文本，
						默认的文本可以通过resources/messages/message_zh_CN.properties来替换,messages可调用方法如下</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>getMessage(Message message)</td>
									<td>返回信息文本</td>
									<td>String</td>
									<td>&#36;{messages.getMessage(message) }</td>
								</tr>
								<tr>
									<td>getMessage(String code, String defaultMessage)</td>
									<td>返回信息文本</td>
									<td>String</td>
									<td>&#36;{messages.getMessage(code,defaultMessage) }</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h2 id="space">space</h2>
					<p>获取当前访问空间对象，如果没有访问任何空间，返回null，space可供访问属性如下</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否可能为null</th>
									<th class="col-md-6">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>id</td>
									<td>Integer</td>
									<td>否</td>
									<td>空间ID</td>
								</tr>
								<tr>
									<td>alias</td>
									<td>String</td>
									<td>否</td>
									<td>空间别名</td>
								</tr>
								<tr>
									<td>name</td>
									<td>String</td>
									<td>否</td>
									<td>空间名</td>
								</tr>
								<tr>
									<td>isPrivate</td>
									<td>Boolean</td>
									<td>否</td>
									<td>是否是私有空间</td>
								</tr>
								<tr>
									<td>createDate</td>
									<td>Timestamp</td>
									<td>否</td>
									<td>空间创建日期</td>
								</tr>
								<tr>
									<td>lockId</td>
									<td>String</td>
									<td>是</td>
									<td>锁ID，如果没有被锁保护，则为null</td>
								</tr>
								<tr>
									<td>isDefault</td>
									<td>Boolean</td>
									<td>否</td>
									<td>是否是默认空间</td>
								</tr>
							</tbody>
						</table>
					</div>

					<h2 id="this">this</h2>
					<p>用来获取当前被解析的对象</p>
					<p>对象可能为Page(用户自定义页面)、Fragment(用户自定义模板片断)，所有模版都实现了Template接口，因此可以访问Template中的方法</p>
					<h3>Template</h3>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>isRoot()</td>
									<td>判断是否是主模版</td>
									<td>boolean</td>
									<td>&#36;{this.isRoot() }</td>
								</tr>
								<tr>
									<td>getTemplate()</td>
									<td>获取模版内容</td>
									<td>String</td>
									<td>&#36;{this.getTemplate() }</td>
								</tr>
								<tr>
									<td>getTemplateName()</td>
									<td>获取模板名称</td>
									<td>String</td>
									<td>&#36;{this.getTemplateName() }</td>
								</tr>
								<tr>
									<td>isCallable()</td>
									<td>是否可被ajax调用</td>
									<td>boolean</td>
									<td>&#36;{this.isCallable() }</td>
								</tr>
							</tbody>
						</table>
					</div>

					<h3>Page</h3>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否可能为null</th>
									<th class="col-md-6">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>id</td>
									<td>Integer</td>
									<td>否</td>
									<td>页面ID</td>
								</tr>
								<tr>
									<td>space</td>
									<td>Space</td>
									<td>是</td>
									<td>空间，可访问属性等同于<a href="#space">space</a></td>
								</tr>
								<tr>
									<td>name</td>
									<td>String</td>
									<td>否</td>
									<td>页面名称</td>
								</tr>
								<tr>
									<td>description</td>
									<td>String</td>
									<td>否</td>
									<td>页面描述</td>
								</tr>
								<tr>
									<td>createDate</td>
									<td>Timestamp</td>
									<td>否</td>
									<td>页面创建时间</td>
								</tr>
								<tr>
									<td>alias</td>
									<td>String</td>
									<td>否</td>
									<td>页面别名</td>
								</tr>
								<tr>
									<td>allowComment</td>
									<td>boolean</td>
									<td>否</td>
									<td>是否允许评论</td>
								</tr>
							</tbody>
						</table>
					</div>

					<h3>Fragment</h3>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>属性名</th>
									<th class="col-md-3">类型</th>
									<th>是否可能为null</th>
									<th class="col-md-6">说明</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>name</td>
									<td>String</td>
									<td>否</td>
									<td>fragment名称</td>
								</tr>
								<tr>
									<td>id</td>
									<td>Integer</td>
									<td>否</td>
									<td>模板片段ID</td>
								</tr>
								<tr>
									<td>createDate</td>
									<td>Timestamp</td>
									<td>否</td>
									<td>页面创建时间</td>
								</tr>
								<tr>
									<td>description</td>
									<td>String</td>
									<td>否</td>
									<td>模板片段描述</td>
								</tr>
								<tr>
									<td>space</td>
									<td>Space</td>
									<td>是</td>
									<td>只能访问id|name两个属性，该值不代表当前访问的space，而是代表该fragment所属的space</td>
								</tr>
								<tr>
									<td>global</td>
									<td>boolean</td>
									<td>否</td>
									<td>是否是全局模板片段</td>
								</tr>
							</tbody>
						</table>
					</div>

					<h2>jsons</h2>
					<p>用来辅助json操作，包括将对象序列化为json，解析json字符串等，主要可调用方法如下：</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>write(Object obj)</td>
									<td>将对象序列化为json</td>
									<td>String</td>
									<td>&#36;{jsons.write(obj) }</td>
								</tr>
								<tr>
									<td>read(String url)</td>
									<td>读取地址中的json内容，返回一个ExpressionExecutor，<a
										data-toggle="modal" data-target="#expressionExecutorModal"
										href="###">查看ExpressionExecutor的可调用访问</a></td>
									<td>ExpressionExecutor</td>
									<td>&#36;{jsons.read(url) }</td>
								</tr>
								<tr>
									<td>readForExecutors(String url)</td>
									<td>读取地址中的json内容，返回一个ExpressionExecutors，<a
										data-toggle="modal" data-target="#expressionExecutorsModal"
										href="###">查看ExpressionExecutors的可调用访问</a></td>
									<td>ExpressionExecutors</td>
									<td>&#36;{jsons.readForExecutors(url) }</td>
								</tr>
								<tr>
									<td>readJson(String json)</td>
									<td>读取json内容，返回一个ExpressionExecutor，<a data-toggle="modal"
										data-target="#expressionExecutorModal" href="###">查看ExpressionExecutor的可调用访问</a></td>
									<td>ExpressionExecutor</td>
									<td>&#36;{jsons.readJson(json) }</td>
								</tr>
								<tr>
									<td>readJsonForExecutors(String json)</td>
									<td>读取json内容，返回一个ExpressionExecutors，<a
										data-toggle="modal" data-target="#expressionExecutorsModal"
										href="###">查看ExpressionExecutors的可调用访问</a></td>
									<td>ExpressionExecutors</td>
									<td>&#36;{jsons.readJsonForExecutors(json) }</td>
								</tr>
								<tr>
									<td>toJsonResult(boolean success,Object obj)</td>
									<td>将对象封装成JsonResult后序列化输出</td>
									<td>String</td>
									<td>&#36;{jsons.toJsonResult(true,obj) }</td>
								</tr>
							</tbody>
						</table>
					</div>



					<h2>times</h2>
					<p>用来辅助时间操作，主要可调用访问如下：</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>now()</td>
									<td>返回当前时间</td>
									<td>LocalDateTime</td>
									<td>${times.now()}</td>
								</tr>
								<tr>
									<td>parseAndGet(String text)</td>
									<td>解析并且返回时间，可接受格式如下：
										<ul>
											<li>yyyy-MM-dd</li>
											<li>yyyy/MM/dd</li>
											<li>yyyy-MM-dd HH:mm:ss</li>
											<li>yyyy-MM-dd HH:mm</li>
											<li>yyyy-MM-dd HH</li>
											<li>yyyy/MM/dd HH:mm:ss</li>
											<li>yyyy/MM/dd HH:mm</li>
											<li>yyyy/MM/dd HH</li>
										</ul>， 除此之外，还可转化long类型的时间戳，如果无法被转化，返回null
									</td>
									<td>LocalDateTime</td>
									<td>${times.parseAndGet(2010-01-01)}</td>
								</tr>
								<tr>
									<td>format(Temporal temporal, String pattern)</td>
									<td>格式化一个时间，返回一个不为null的字符串</td>
									<td>String</td>
									<td>${times.format(times.now(),'yyyy-MM-dd HH:mm:ss')}</td>
								</tr>
								<tr>
									<td>parse(String text, String pattern)</td>
									<td>通过一个指定的pattern来解析日期</td>
									<td>Optional&lt;LocalDateTime&gt;</td>
									<td>${times.parse('2010-01-01 00:00:00','yyyy-MM-dd
										HH:mm:ss')}</td>
								</tr>
								<tr>
									<td>parse(String text)</td>
									<td>解析并且返回时间，可接受格式如下：
										<ul>
											<li>yyyy-MM-dd</li>
											<li>yyyy/MM/dd</li>
											<li>yyyy-MM-dd HH:mm:ss</li>
											<li>yyyy-MM-dd HH:mm</li>
											<li>yyyy-MM-dd HH</li>
											<li>yyyy/MM/dd HH:mm:ss</li>
											<li>yyyy/MM/dd HH:mm</li>
											<li>yyyy/MM/dd HH</li>
										</ul>， 除此之外，还可转化long类型的时间戳
									</td>
									<td>Optional&lt;LocalDateTime&gt;</td>
									<td>${times.parse(2010-01-01)}</td>
								</tr>
								<tr>
									<td>format(Date date,String pattern)</td>
									<td>格式化日期，并返回不为null的字符串</td>
									<td>String</td>
									<td>${times.format(date)}</td>
								</tr>
								<tr>
									<td>toLocalDateTime(Date date)</td>
									<td>将Date转化为LocalDateTime</td>
									<td>LocalDateTime</td>
									<td>${times.toLocalDateTime(date)}</td>
								</tr>
								<tr>
									<td>parseAndGetDate(String text)</td>
									<td>解析并且返回时间，可接受格式如下：
										<ul>
											<li>yyyy-MM-dd</li>
											<li>yyyy/MM/dd</li>
											<li>yyyy-MM-dd HH:mm:ss</li>
											<li>yyyy-MM-dd HH:mm</li>
											<li>yyyy-MM-dd HH</li>
											<li>yyyy/MM/dd HH:mm:ss</li>
											<li>yyyy/MM/dd HH:mm</li>
											<li>yyyy/MM/dd HH</li>
										</ul>， 除此之外，还可转化long类型的时间戳，如果无法被转化，返回null
									</td>
									<td>Date</td>
									<td>${times.parseAndGetDate(2010-01-01)}</td>
								</tr>

								<tr>
									<td>toDate(LocalDateTime time)</td>
									<td>将LocalDateTime转化为Date</td>
									<td>Date</td>
									<td>${times.toDate(time)}</td>
								</tr>

								<tr>
									<td>getYear(Temporal temporal)</td>
									<td>从时间中获取年份</td>
									<td>int</td>
									<td>${times.getYear(time)}</td>
								</tr>

								<tr>
									<td>getMonthOfYear(Temporal temporal)</td>
									<td>从时间中获取月份</td>
									<td>int</td>
									<td>${times.getMonthOfYear(time)}</td>
								</tr>

								<tr>
									<td>getDayOfMonth(Temporal temporal)</td>
									<td>从时间中获取天</td>
									<td>int</td>
									<td>${times.getDayOfMonth(time)}</td>
								</tr>


								<tr>
									<td>getYear(Date date)</td>
									<td>从时间中获取年份</td>
									<td>int</td>
									<td>${times.getYear(date)}</td>
								</tr>

								<tr>
									<td>getMonthOfYear(Date date)</td>
									<td>从时间中获取月份</td>
									<td>int</td>
									<td>${times.getMonthOfYear(date)}</td>
								</tr>

								<tr>
									<td>getDayOfMonth(Date date)</td>
									<td>从时间中获取天</td>
									<td>int</td>
									<td>${times.getDayOfMonth(date)}</td>
								</tr>


								<tr>
									<td>getTime(Timestamp time)</td>
									<td>从时间中获取时间戳</td>
									<td>long</td>
									<td>${times.getTime(time)}</td>
								</tr>
								<tr>
									<td>getTime(Date date)</td>
									<td>从时间中获取时间戳</td>
									<td>long</td>
									<td>${times.getTime(date)}</td>
								</tr>

							</tbody>
						</table>
					</div>



					<h2>formats</h2>
					<p>用来使一些类型的数值更加的可读</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>readByte(long bytes, boolean si)</td>
									<td>使字节更加的可读,bytes是字节，si如果为true，则1000字节为1k，如果为false，则1024字节为1K</td>
									<td>String</td>
									<td>${formats.readByte(bytes,si)}</td>
								</tr>
								<tr>
									<td>readByte(long bytes)</td>
									<td>相当于readByte(long bytes,true)</td>
									<td>String</td>
									<td>${formats.readByte(bytes)}</td>
								</tr>
							</tbody>
						</table>
					</div>

					<h2 id="gravatars">gravatars</h2>
					<p>用来获取用户的gravatar访问地址</p>
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>getUrl(emailMd5)</td>
									<td>根据邮箱的md5值返回gravatar头像访问地址</td>
									<td>String</td>
									<td>${gravatars.getUrl(emailMd5)}</td>
								</tr>
								<tr>
									<td>getOptionalUrl(emailMd5)</td>
									<td>根据邮箱的md5值返回gravatar头像访问地址，emailMd5可以为空</td>
									<td>OptionalGravatarUrl</td>
									<td>${gravatars.getOptionalUrl(emailMd5).orElse('/static/img/guest.png')}</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="alert alert-warning">
						OptionalGravatarUrl只支持一个orElse(String url)方法，orElse()方法的url参数为一个相对或者绝对路径，路径指向一个替换头像
						例如${gravatars.getOptionalUrl(emailMd5).orElse('/static/img/guest.png')},如果emailMd5为null或者为空，返回
						urls.url+'/static/img/guest.png',否则等效于${gravatars.getUrl(emailMd5)}
					</div>

				</div>
			</div>
		</div>
	</div>

	<div class="modal fade" id="articlesUrlHelperModal" tabindex="-1"
		role="dialog" aria-labelledby="articlesUrlHelperModalLabel">
		<div class="modal-dialog modal-lg" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="articlesUrlHelperModalLabel">ArticlesUrlHelper属性</h4>
				</div>
				<div class="modal-body">
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>getArticlesUrl(Space space)</td>
									<td>获取某个空间文章列表链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(space) }</td>
								</tr>
								<tr>
									<td>getArticlesUrl(Tag tag)</td>
									<td>获取根据标签查询的文章分页链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(tag) }</td>
								</tr>
								<tr>
									<td>getArticlesUrl(String tag)</td>
									<td>获取根据标签查询的文章分页链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(tag) }</td>
								</tr>
								<tr>
									<td>getArticlesUrl(ArticleQueryParam param, String
										sortStr)</td>
									<td>根据分页参数和指定排序获取查询链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(param,sortStr)
										}</td>
								</tr>
								<tr>
									<td>getArticlesUrl(ArticleQueryParam param, int page)</td>
									<td>根据查询参数和指定页面获取查询链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(param,page) }</td>
								</tr>
								<tr>
									<td>getArticlesUrl(Date begin, Date end)</td>
									<td>根据指定时间段获取查询链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(begin,end) }</td>
								</tr>
								<tr>
									<td>getArticlesUrl(String begin, String end)</td>
									<td>根据指定时间段获取查询链接</td>
									<td>String</td>
									<td>&#36;{articlesUrlHelper.getArticlesUrl(begin,end) }</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	
	<div class="modal fade" id="newsUrlHelperModal" tabindex="-1"
		role="dialog" aria-labelledby="newsUrlHelperModalLabel">
		<div class="modal-dialog modal-lg" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="newsUrlHelperModalLabel">NewsUrlHelper</h4>
				</div>
				<div class="modal-body">
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>getNewsUrl(NewsQueryParam param, int page)</td>
									<td>根据查询参数和指定页面获取查询链接</td>
									<td>String</td>
									<td>&#36;{newsUrlHelper.getNewsUrl(space) }</td>
								</tr>
								<tr>
									<td>getNewsUrl(Date begin, Date end)</td>
									<td>根据指定时间段获取查询链接</td>
									<td>String</td>
									<td>&#36;{newsUrlHelper.getNewsUrl(begin,end) }</td>
								</tr>
								<tr>
									<td>getNewsUrl(String begin, String end)</td>
									<td>根据指定时间段获取查询链接</td>
									<td>String</td>
									<td>&#36;{newsUrlHelper.getNewsUrl(begin,end) }</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	
	<div class="modal fade" id="cookieHelperModal" tabindex="-1"
		role="dialog" aria-labelledby="cookieHelperModalLabel">
		<div class="modal-dialog modal-lg" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="articlesUrlHelperModalLabel">CookieHelper</h4>
				</div>
				<div class="modal-body">
					<div class="table-responsive">
						<table class="table">
							<thead>
								<tr>
									<th>方法</th>
									<th class="col-md-5">说明</th>
									<th class="col-md-2">返回类型</th>
									<th class="col-md-3">示例</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>getCookie(String name)</td>
									<td>获取某个Cookie，如果不存在，返回null</td>
									<td>Cookie</td>
									<td>&#36;{cookieHelper.getCookie('cookieName') }</td>
								</tr>
								<tr>
									<td>addCookie(String name, String value, int maxAge)</td>
									<td>添加一个cookie(如果不存在)</td>
									<td>void</td>
									<td>&#36;{cookieHelper.addCookie('cookieName','cookieValue',-1) }</td>
								</tr>
								<tr>
									<td>deleteCookie(String name)</td>
									<td>删除一个cookie</td>
									<td>void</td>
									<td>&#36;{cookieHelper.deleteCookie('cookieName') }</td>
								</tr>
								<tr>
									<td>setCookie(String name, String value, int maxAge)</td>
									<td>如果不存在对应名称的cookie，则添加一个cookie，否则更新当前cookie的值</td>
									<td>void</td>
									<td>&#36;{cookieHelper.setCookie('cookieName','cookieValue',-1) }</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	
	
	<div class="modal fade" id="expressionExecutorModal" tabindex="-1"
	role="dialog" aria-labelledby="expressionExecutorModalLabel">
	<div class="modal-dialog modal-lg" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="expressionExecutorModalLabel">ExpressionExecutor</h4>
			</div>
			<div class="modal-body">
				<p>假设有以下json字符串:</p>
				<pre class="prettyprint lang-json">{
	"success": true,
	"data": {
		"data": {
	  		"files": [
	    		{
	      			"begin": "Jan 26, 2017 12:00:00 AM",
	      			"end": "Jan 27, 2017 12:00:00 AM",
	      			"count": 1
	    		}
	  		],
	  		"mode": "YMD"
		},
		"dataName": "articleDateFiles"
	}	
}</pre>
				<div class="alert alert-warning">ExpressionExecutor用来处理单个节点，而
					ExpressionExecutors用来处理Json数组，例如executeForExecutors(data->data->files)返回以files为根节点的ExpressionExecutors,
					而通过for(ExpressionExecutor executor :
					expressionExecutors)遍历可以获取files数组下面每个子节点对应的ExpressionExecutor，如果只需要其中一个节点的ExpressExecutor，那么可以通过
					executeForExecutor(data->data->files[0])来获取即可</div>
				<div class="table-responsive">
					<table class="table">
						<thead>
							<tr>
								<th>方法</th>
								<th class="col-md-5">说明</th>
								<th class="col-md-2">返回类型</th>
								<th class="col-md-3">示例</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>executeForExecutor(String expression)</td>
								<td>执行一个表达式，返回一个ExpressionExecutor</td>
								<td>String</td>
								<td>&#36;{exepressionExecutor.executeForExecutor(expression)
									}，例如${expressionExecutor.executorForExecutor('data->data->mode')}
									就会返回以mode节点为根节点的ExpressionExecutor</td>
							</tr>
							<tr>
								<td>executeForExecutors(String expression)</td>
								<td>执行一个表达式，返回一个ExpressionExecutors</td>
								<td>String</td>
								<td>&#36;{exepressionExecutor.executeForExecutors(expression)
									}，例如${expressionExecutor.executorForExecutors('data->data->files')}
									就会返回以files节点为根节点的ExpressionExecutors</td>
							</tr>
							<tr>
								<td>execute(String expression)</td>
								<td>执行一个表达式并返回结果</td>
								<td>Optional&lt;String&gt;</td>
								<td>&#36;{exepressionExecutor.execute(expression)
									}，例如${expressionExecutor.executor('data->data->mode')}
									就会返回mode节点的内容:Optional[YMD]，而${expressionExecutor.executor('data->data')}就会返回

									<pre class="prettyprint lang-json">Optional["files": [{"begin": "Jan 26, 2017 12:00:00 AM","end": "Jan 27, 2017 12:00:00 AM","count": 1}],"mode": "YMD"]</pre>
								</td>
							</tr>
							<tr>
								<td>get()</td>
								<td>返回当前内容</td>
								<td>Optional&lt;String&gt;</td>
								<td>同execute(null)</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>


<div class="modal fade" id="expressionExecutorsModal" tabindex="-1"
	role="dialog" aria-labelledby="expressionExecutorsModalLabel">
	<div class="modal-dialog modal-lg" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="expressionExecutorsModalLabel">ExpressionExecutor</h4>
			</div>
			<div class="modal-body">
				<div class="table-responsive">
					<table class="table">
						<thead>
							<tr>
								<th>方法</th>
								<th class="col-md-5">说明</th>
								<th class="col-md-2">返回类型</th>
								<th class="col-md-3">示例</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>size()</td>
								<td>返回ExpressionExecutor的数量</td>
								<td>int</td>
								<td>${expressionExecutors.size()}</td>
							</tr>
							<tr>
								<td>getExpressionExecutor(int index)</td>
								<td>获取某个位置的ExpressionExecutor</td>
								<td>ExpressionExecutor</td>
								<td>${expressionExecutors.get(0)}</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>
	
</body>



<script type="text/javascript" src="../static/jquery/jquery.min.js"></script>
<script type="text/javascript"
	src="../static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../static/prettify/prettify.js"></script>
<script>
	$(function() {
		$("#nav").load("nav.html");
	});
</script>
</html>